<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model common\models\Company */
/* @var $form yii\widgets\ActiveForm */
?>
<link rel="stylesheet" href="/static/css/form.css">
<div class="form">

     <?php $form = ActiveForm::begin( [
            'options'=>['class' => '','style'=>'padding-top:20px;'],
            'fieldConfig' => [
                'labelOptions' => ['class' => 'layui-form-label',],
                'inputOptions' => ['class' => 'layui-input','style'=>'width:300px'],
            ],
        ]); ?>
        <fieldset class="layui-elem-field layui-field-title" >
        <legend><?= $model->isNewRecord?'新增':'修改' ?>公司资料</legend>
    </fieldset>
        <?php echo $form->errorSummary($model); ?>
        
        <table class="table table-bordered table-hover ">
		
		
		<tr>
        	<td width="20%" class="tableleft">公司权限<span class="required">*</span></td>
        	<td><?= $form->field($model, 'company_name')->textInput(['maxlength' => true])->label(false) ?>
		</td>
  	  	</tr>
  	  	<tr>
        	<td width="20%" class="tableleft">是否显示<span class="required">*</span></td>
        	<td><?= $form->field($model, 'is_display')->radioList(['1'=>'显示','0'=>'不显示']) ->label(false) ?>
		</td>
  	  	</tr>  	  	
  	  	<tr>
        	<td width="20%" class="tableleft">排序</td>
        	<td><?= $form->field($model, 'sort')->textInput(['maxlength' => true])->label(false) ?>
		</td>
  	  	</tr>
  	  	

		
		</table>
		<?= $form->field($model, 'created_at')->textInput(['maxlength' => true,'style'=>'display:none'])->label(false) ?>
  <!--       
	<div class="layui-form-item">
        <label class="layui-form-label">*公司名称</label>
        <div class="layui-input-block">
            <?= $form->field($model, 'company_name')->textInput(['maxlength' => true])->label(false) ?>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">*排序</label>
        <div class="layui-input-block">
            <?= $form->field($model, 'sort')->textInput()->label(false) ?>
        </div>
    </div>
	<div class="layui-form-item">
        <label class="layui-form-label">*是否显示</label>
        <div class="layui-input-block">
            <?= $form->field($model, 'is_display')->textInput()->label(false) ?>
        </div>
    </div>
     -->
    


    <div class="form-group">
    	<div><?php if(isset($_GET['success'])){echo '修改成功！';}?></div>
        <?= Html::submitButton($model->isNewRecord ? '保存' : '提交修改', ['class' => $model->isNewRecord ? 'layui-btn' : 'layui-btn']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
